<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/meta.jsp"%>
<style type="text/css">

.budgetTable {
	margin: auto;
	border-top: 1px solid #000000;
	border-left: 1px solid #000000;
}

.budgetTable tr td {
	height:25px;
	border-bottom: 1px solid #000000;
	border-right: 1px solid #000000;
	font-family: sans-serif;
}

.budgetTable tr th {
	background-color: #ECECEC;
	height:30px;
 	font-weight: bold;
 	font-size:13px;
 	text-align: center;
	border-bottom: 1px solid #000000;
	border-right: 1px solid #000000;
	font-family: sans-serif;
}

.itemInfo{
    line-height: 20px;
    font-family: sans-serif;
}

.budgetItem {
	margin:auto;
	border: 0px;
	height:20px;
	width: 85px;
	color: green;
	text-align: right;
}
.title{
	color: blue;
	padding-left: 10px;
}
</style>
</head>
<body>
<div style="margin: 5px; font-family: sans-serif; font-size: 14px; text-align: left;">
  <table class="budgetTable" cellpadding="0" cellspacing="0">
    <tr>
      <th colspan="6" class="title">预算审核状态</th>
    </tr>
    <tr>
      <th width="40">No.</th>
      <th width="120">审核部门</th>
      <th width="100">审核人</th>
      <th width="100">审核日期</th>
      <th width="100">审核状态</th>
      <th width="302">审核意见</th>
    </tr>
    <s:iterator value="model.topFlow.nodes" var="node">
    <tr>
      <td align="center">${node.orderId}</td>
      <td>
        &nbsp;
        <s:if test="#attr.node.dept != null">
	        ${node.dept.name}
        </s:if>
        <s:else>
        	<s:if test='#attr.node.isFinance == "1"'>
	        	<i>财务</i>
        	</s:if>
        </s:else>
      </td>
      <td>&nbsp;${node.auditor.name}</td>
      <td>&nbsp;<s:date name="#attr.node.audDate" format="yyyy/MM/dd HH:mm"/></td>
      <td align="center">
	    <s:if test='#attr.node.status == "nopass"'>
	      <span style="color: red;">未通过</span>
	    </s:if>
	    <s:elseif test='#attr.node.status == "pass"'>
	      <span style="color: green;">通过</span>
	    </s:elseif>
	    <s:else>
	      <span style="color: silver;">未审核</span>
	    </s:else>&nbsp;
      </td>
      <td>&nbsp;${node.descn}</td>
    </tr>
    </s:iterator>
  </table>
</div>
<div style="margin: 5px;">
<table class="budgetTable" cellpadding="0" cellspacing="0">
  <tr>
    <th colspan="9" style="text-align: left;">&nbsp;&nbsp;
      <b>预算部门</b>：${model.dept.name}&nbsp;&nbsp;
      <b>年度</b>：${model.year}年&nbsp;&nbsp;
      <b>额度</b>：<span style="color: red;">${model.amount}&nbsp;&yen;&nbsp;</span>
    </th>
  </tr>
  <tr>
    <th width="110">科目编码/名称</th>
    <th width="50">季度</th>
    <s:if test='model.btype == "month"'>
    <th width="50">月份</th>
    </s:if>
    <th width="100">预算金额 &yen;</th>
    <th width="100">第1次追加 &yen;</th>
    <th width="100">第2次追加 &yen;</th>
    <th width="100">第3次追加 &yen;</th>
    <th width="100">第4次追加 &yen;</th>
    <th width="100">最终预算额 &yen;</th>
  </tr>
  <s:iterator value="model.budgetItems" var="bi">
    <tr>
      <td width="110" valign="middle" style="border-bottom: 2px solid;">
        <div class="itemInfo">
          &nbsp;<span title="科目名称">${bi.item.name}</span><br>
          &nbsp;<span title="科目编码">${bi.item.code}</span>
        </div>
        <div class="itemInfo" style="text-align: right; color: green; font-weight: bold; border-top: 1px dashed #CCC;">
          &nbsp;小计：${bi.amount}&nbsp;&yen;&nbsp;
        </div>
      </td>
      <td colspan="8" style="padding: 0px;">
        <table cellpadding="0" cellspacing="0" align="center">
          <s:iterator value="#attr.bi.bims" var="bim">
            <tr>
                <td width="50" align="center" style="color: blue;">
                  ${bim.qtr}季&nbsp;
                </td>
                <s:if test='model.btype == "month"'>
		        <td width="50" align="right" style="color: blue;">
		          ${bim.month}月&nbsp;&nbsp;
		        </td>
       		    </s:if>
		        <td width="100" align="center">
		          <span class="budgetItem">${bim.amount}</span>
		        </td>
		        <td width="100" align="center">
		          <span class="budgetItem">${bim.add1th}</span>
		        </td>
		        <td width="100" align="center">
		          <span class="budgetItem">${bim.add2th}</span>
		        </td>
		        <td width="100" align="center">
		          <span class="budgetItem">${bim.add3th}</span>
		        </td>
		        <td width="100" align="center">
		          <span class="budgetItem">${bim.add4th}</span>
		        </td>
		        <td width="100" align="right" style="border-right:0px; color: red; font-weight: bold; font-size: 13px;">
		          ${bim.finalAmount}&nbsp;&yen;&nbsp;&nbsp;
		        </td>
            </tr>
          </s:iterator>
        </table>
      </td>
    </tr>
  </s:iterator>
</table>
</div>
</body>
</html>